//
//  HomeHeader.m
//  ZZmetro
//
//  Created by 一介布衣 on 2020/6/12.
//  Copyright © 2020 一介布衣. All rights reserved.
//

#import "HomeHeader.h"

@implementation HomeHeader

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        SDCycleScrollView *banner = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0,SCREEN_WIDTH, 116)
                                                                       delegate:self
                                                               placeholderImage:[UIImage imageNamed:@"bg_welcome.jpeg"]];
        
        //banner.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
        banner.currentPageDotColor = [UIColor whiteColor];
        banner.imageURLStringsGroup = @[@"bg_welcome.jpeg", @"bg_welcome.jpeg"];
        banner.autoScrollTimeInterval = 5;
        banner.currentPageDotColor = [UIColor redColor];
        banner.pageDotColor = [UIColor whiteColor];
        banner.layer.masksToBounds = YES;
        //banner.layer.cornerRadius = 4;
        [self addSubview:banner];
    }
    
    return self;
}


/** 点击图片回调 */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
    
}

/** 图片滚动回调 */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index {
    
}

@end
